﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Gencode.PrsUtil.Print.GridPrint
{
	public partial class GridPreview : Form
	{
		bool closeAfterLoad = true;
		public bool CloseAfterLoad
		{
			get
			{
				return closeAfterLoad;
			}
			set
			{
				closeAfterLoad = value;
			}
		}

		public DataGridView Grid
		{
			get
			{
				return displayGrid;
			}
			set
			{
				displayGrid = value;
			}
		}

		public GridPreview()
		{
			InitializeComponent();
		}

		private void GridPreview_Load(object sender, EventArgs e)
		{
			if (closeAfterLoad)
				this.Close();
		}

		public void Render()
		{
			this.ShowDialog();
		}
	}
}
